﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Vit.Common.Extensions
{
    public static class UriExtension
    {
        public static string GetLocalPath(this Uri url)
        {
            return string.Format("{0}://{1}/{2}",
                url.Scheme, url.Authority, url.LocalPath);
        }

        public static string GetDomain(this Uri url)
        {
            return string.Format("{0}://{1}", url.Scheme, url.Host);
        }

        public static string GetDomainWithPort(this Uri url)
        {
            return string.Format("{0}://{1}", url.Scheme, url.Authority);
        }
    }
}
